import { http } from '@/axios'

/**
 * @description 微信授权地址
 */
export function getWxQrcode(data) {
  return http.request({
    url: '/auth/getWxUrl',
    method: 'POST',
    data,
  })
}

/**
 * @description 检测微信是否登录
 */
export function checkWxLogin(data) {
  return http.request({
    url: '/auth/checkWxLogin',
    method: 'POST',
    data,
  })
}

/**
 * @description 用户信息
 */
export function userInformation() {
  return http.request({
    url: '/auth/getme',
    method: 'GET',
  })
}

/**
 * @description 获取token
 */
export function obtainToken() {
  return http.request({
    url: '/userApis/get',
    method: 'GET',
  })
}

/**
 * @description 创建/重置token
 */
export function createResetToken(data) {
  return http.request({
    url: '/userApis/create',
    method: 'POST',
    data,
  })
}
